Assignemnt #85 and 84th program
Code
///Name: Derrick Andreasen
///Period: 7
///Program name: 84th Program
///File name: Eigh4prog.java
///Date Finished:1/11/2016
import java.util.Scanner;
import java.util.Random;
public class Eigh4prog
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int n;
for (n = 1; n <= 100; n = n + 1)
{
if(n%3 == 0)
{
System.out.println( "Fizz" );
if(n%5 == 0)
{
System.out.println( "FizzBuzz" );
}
}
else if(n%5 == 0)
{
System.out.println( "Buzz" );
}
else
{
System.out.println(n);
}
}
}
}
Picture of the output